/* 经典案例 */
.cases {
    background: var(--light-bg);
    position: relative;
}

.cases::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234caf50' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.carousel-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.cases-carousel {
    display: flex;
    transition: transform 0.5s ease;
}

.case-card {
    flex: 0 0 calc(33.333% - 20px);
    margin: 0 10px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.case-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

.case-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.case-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5));
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    background-size: cover; /* 或者 contain */
    background-position: center;
    background-repeat: no-repeat;
}

.case-card:hover .case-image img {
    transform: scale(1.1);
}

.case-content {
    padding: 30px;
    position: relative;
}

.case-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    width: 40px;
    height: 3px;
    background: var(--gradient);
    transform: translateY(-50%);
    border-radius: 3px;
}

.case-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition);
}

.case-card:hover .case-content h3 {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.prev-btn,
.next-btn {
    background: var(--gradient);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.prev-btn:hover,
.next-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--box-shadow-hover);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 20px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* 响应式设计 - 案例轮播 */
@media (max-width: 992px) {
    .case-card {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .case-card {
        flex: 0 0 calc(100% - 20px);
    }
}